package com.lingnan.tijian.mapper;

import com.lingnan.tijian.domain.Setmeal;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SetmealMapper {
    int deleteByPrimaryKey(Integer smId);

    int insert(Setmeal record);

    int insertSelective(Setmeal record);

    Setmeal selectByPrimaryKey(Integer smId);

    int updateByPrimaryKeySelective(Setmeal record);

    int updateByPrimaryKey(Setmeal record);

    //根据类型查询套餐列表数据
    @Select("select smId, name, type, price from setmeal where type=#{type}")
    List<Setmeal> selectByType(@Param("type") Integer type);
}